//
//  CZConstant.swift
//  git
//
//  Created by 徐 鹏超 on 16/4/9.
//  Copyright © 2016年 徐 鹏飞. All rights reserved.
//

import UIKit

func printLog<T>(message: T,
    logError: Bool = false,
    file: String = __FILE__,
    method: String = __FUNCTION__,
    line: Int = __LINE__)
{
    if logError {
        print("\((file as NSString).lastPathComponent)[\(line)], \(method): \(message)")
    } else {
        #if DEBUG
            print("\((file as NSString).lastPathComponent)[\(line)], \(method): \(message)")
        #endif
    }
}


//MARK:-- APP的一些信息

let AppKey = "612414931"
let AppSecret = "0b8f332053579cc33470daa74405d9fa"
let AppURL = "http://www.itcast.cn"

//let AppKey = "1944760495"
//let AppSecret = "60c3f17835e5359c7f76fb1dbdd6e7c3"
//let AppURL = "http://www.baidu.com/"


//MARK:

//let path = NSSearchPathForDirectoriesInDomains(NSSearchPathDirectory.DocumentDirectory, NSSearchPathDomainMask.UserDomainMask, true).last!
//// 1.2 拼接一个文件夹路径 -- 把 string转换成 NSString
//// 默认 as 前边一般都是 非可选项
//let filePath = (path as NSString).stringByAppendingPathComponent("info.data")

let path = NSSearchPathForDirectoriesInDomains(NSSearchPathDirectory.DocumentDirectory,NSSearchPathDomainMask.UserDomainMask , true).last!

let filePath = (path as NSString).stringByAppendingPathComponent("info.data")

//MARK:通知的名字
let kNotificationChangeController = "kNotificationChangeController"
let kNotificationEmoticon = "kNotificationEmoticon"

let isLogin:Bool = CZUserModel.getModel()?.access_token == nil ? false : true


let kUIScreenWidth = UIScreen.mainScreen().bounds.size.width
let KUIScreenHeight = UIScreen.mainScreen().bounds.size.height
